<!DOCTYPE html>
<html>

<head>
    <base href=/frontendstat />
    <title>家庭云NAS下载</title>
    <meta charset=utf-8>
    <meta name=description content=数据统计>
    <meta name=format-detection content="telephone=no">
    <meta name=msapplication-tap-highlight content=no>
    <meta name=viewport content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width">
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            background-color: #f8f8f8;
        }

        .bg {
            position: fixed;
            width: 80vw;
            height: 40vh;
            top: 40%;
            left: 50%;
            transform: translate(-50%, -50%);
            display: flex;
            flex-direction: column;
            justify-content: space-around;
            align-items: center;
        }

        .bg>div:first-child {
            width: 50%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            
        }
        p{
            font-size: 6vw;
            /* font-weight: 700; */
        }
        .img {
            width: 80%;
        }

        .download-button {
            width: 80vw;
            height: 6vh;
            background: #4B81FB;
            box-shadow: 0px 4px 4px 0px #7DABEF;
            border-radius: 50px;

            color: white;
            font-size: 6.2vw;
            display: flex;
            justify-content: center;
            align-items: center;
        }
    </style>


</head>

<body>
    <div class="bg">
        <div>
            <img class="img" src="" alt="">
            <p>家庭云NAS</p>
        </div>

        <div class="download-button">下载</div>
    </div>
</body>



<script>


    const btn = document.querySelector('.download-button');

    btn.addEventListener('click', () => {
        var tagA = document.createElement('a');
        tagA.setAttribute('href', 'https://nascenter.kaixiangtech.com:10443/app/YunNasApp.apk');
        tagA.setAttribute('downoad', true);
        tagA.style.display = 'none'; // append 在 android 6 系统中有兼容性问题
        // eslint-disable-next-line unicorn/prefer-node-append

        document.body.appendChild(tagA);
        tagA.click();
    });



</script>


</html>